{{#unless apiDto.apiEntity.subSysDE}}
package {{packageName}}.{{apis}}.mapping;

{{#with apiDto.apiEntity.entity as | entity | }}
import org.mapstruct.*;
import {{packageName}}.core.{{entity.module}}.domain.{{entity.domainClassName}};
import {{packageName}}.{{apis}}.dto.{{apiDto.codeName}};
import cn.ibizlab.util.domain.MappingBase;

/**
 * {{apiDto.logicName}}转换[{{apiDto.codeName}}]
 *
 * @author generator
 */
@Mapper(componentModel = "spring", uses = {}, implementationName = "{{apiDto.apiEntity.api.codeName}}{{apiDto.codeName}}Mapping",
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
        nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface {{apiDto.codeName}}Mapping extends MappingBase<{{apiDto.codeName}}, {{entity.domainClassName}}> {

{{#if apiDto.needConvertField}}
    @Override
    @Mappings({
        {{#each apiDto.apiDtoFields as |apiField|}}
            {{#if needMapping}}
            @Mapping(source="{{camelCase apiField.opt.name}}", target="{{camelCase apiField.opt.pSDEField.codeName}}"){{#unless @last}},{{/unless}}
            {{/if}}
        {{/each}}
    })
    {{entity.domainClassName}} toDomain({{apiDto.codeName}} dto);

    @Override
    @Mappings({
        {{#each apiDto.apiDtoFields as |apiField|}}
            {{#if needMapping}}
            @Mapping(source="{{camelCase apiField.opt.pSDEField.codeName}}", target="{{camelCase apiField.opt.name}}"){{#unless @last}},{{/unless}}
            {{/if}}
        {{/each}}
    })
    {{apiDto.codeName}} toDto({{entity.domainClassName}} entity);
{{/if}}

}
{{/with}}
{{/unless}}